<template>
  <div>
      <van-cell-group>
      <van-field v-model="value" label="出借" placeholder="请输入出借的金额" />
    </van-cell-group>
    <van-slider
      v-model="value"
      :min="1000"
      :max="1000000"
      :step="1000"
      @change="getss"
    />
    <van-button @click="lends">出借</van-button>
    {{codeid}}
  </div>
  
</template>

<script>
export default {
    data(){
        return{
            value: '',
            codeid:this.$route.params.code
        }
        
    },
    methods:{
        getss() {
      console.log(this.value);
    },
    lends(){
        this.axios.post('getlend',{money:this.value,code:this.codeid,userid:localStorage.getItem('uid')})
        .then(res=>{
            alert(res.data.msg)
        })
    }
    }
    

}
</script>

<style>

</style>